package adapter.exe;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class FileProperties implements FileIo{
	
	private Properties properties;

	public String getValue(String key) {
		return properties.getProperty(key);
	}

	public void readFile(String filename) throws IOException {
		properties = new Properties();
		properties.load(new FileInputStream(filename));
	}

	public void setValue(String key, String value) {
		properties.setProperty(key, value);
	}

	public void writeFile(String filename) throws IOException {
		// TODO Auto-generated method stub
		properties.store(new FileOutputStream(filename), "write by  " + getClass().getName());
	}
	
}
